package com.itheima.vo.testSoulVo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.itheima.domain.testSoul.Questions;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class QuestionsVo implements Serializable {

    /*
     * id
     * */
    private String id;

    /*
     * question
     * */
    private String question;

    /*
     * 选项列表
     * */
    @TableField(exist = false)
    private List<OptionsVo> options;

    public static QuestionsVo inint(Questions questions){
        QuestionsVo questionsVo = new QuestionsVo();
        questionsVo.setId(questions.getId().toString());
        questionsVo.setQuestion(questions.getQuestion());
        return questionsVo;
    }


}
